package gamegui;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JButton;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;


public class ViewChooseMap extends JPanel {

	/**
	 * Create ChooseMap Panel to allow the user to choose a map before starting the game
	 */
	final JButton sel1,sel2,sel3;
	final JButton backToMainButton;
	final Dimension dim = new Dimension (1100, 730);
	public ViewChooseMap() {
	
		// Variables
        Dimension buttonSize = new Dimension(160, 160);
        Point sel1Loc = new Point(281, 390);
        Point sel2Loc = new Point(467, (int) sel1Loc.getY());
        Point sel3Loc = new Point(660, (int) sel1Loc.getY());
        
        // Panel initialization
        JPanel startGamePanel = new JPanel();
        startGamePanel.setLocation(0, 0);  
        
        //Label
        JLabel label = new JLabel();
        ImageIcon startImage = new ImageIcon("play-game-step1.jpg");    
        label = new JLabel("", startImage, JLabel.CENTER);
        label.setLocation(0, 0);
        label.setPreferredSize(dim);
        
        ///Buttons
        sel1 = new JButton("");
        sel1.setSize(buttonSize);
        sel1.setLocation(sel1Loc);
  //      sel1.setActionCommand("sel1");
        label.add(sel1);
        
        sel2 = new JButton("");
        sel2.setSize(buttonSize);
        sel2.setLocation(sel2Loc);
    //    sel2.setActionCommand("sel2");
        label.add(sel2);
        
        sel3 = new JButton("");
        sel3.setSize(buttonSize);
        sel3.setLocation(sel3Loc);
    //    sel3.setActionCommand("sel3");
        label.add(sel3);
        
        backToMainButton = new JButton("Back");
        backToMainButton.setSize(new Dimension(80,40));
        backToMainButton.setLocation(850,470);
      //  backToMainButton.setActionCommand("back");
        label.add(backToMainButton);
        
        startGamePanel.add(label);
        add(startGamePanel);
        
        repaint();
	}
	
	public JButton getBackToMainButton(){
		return backToMainButton;
	}
	public JButton getSel1Button(){
		return sel1;
	}
	public JButton getSel2Button(){
		return sel2;
	}
	public JButton getSel3Button(){
		return sel3;
	}
	
}
